package com.gzy.wb.model;


import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

@Entity
// 数据库的映射对象 数据实体
public class User {
    // int
    // String 随机生成
    //  1. 全局唯一标识符 GUID / 通用唯一标识符 UUID
    //  随机生产
    //      长度 不短
    //      排序
    //   xadsdadasdasdasdasd
    //   fghjghfghjkfghjklghjkl
    //
    //   雪花xxx算法  Twitter 公司的
    //      baiduID   baidu

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    private String username;
    private String password;
    private String email;
    private String avatar;
    // ADMIN
    // USER     两种身份
    private String role;

    // Date 没有时区
    // LocalDateTime
    // 具体时间对象
    // 时间戳

    private Long createAt;

    private Long deleteAt;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public Long getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Long createAt) {
        this.createAt = createAt;
    }

    public Long getDeleteAt() {
        return deleteAt;
    }

    public void setDeleteAt(Long deleteAt) {
        this.deleteAt = deleteAt;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }
}
